1. Field of the Invention
The present invention relates to a device for filtering addresses being transported through a high performance network, and rendering forwarding decisions for data frames corresponding to the address. Such data frames might correspond with a multicast address wherein filtering is needed to prevent undesired data frame uploading and processing by a receiving machine.
2. Description of Related Art
Computers and related devices are commonly networked together using known networking schemes to exchange packets or frames of data (often referred to as data packets, dataframes, or datagrams). Computers connected to a network are often referred to as hosts. On the Internet, the term host generally means any computer that has full two-way access to other computers on the Internet. Computers tied to a network employ some kind of a connection device, such as a network interface card (NIC) to communicate and exchange data with the network.
A variety of different network types exist. For example, a wide area network (WAN) is a geographically dispersed telecommunications network. A WAN may be privately owned or rented, but the term usually is construed to include public (shared user) networks. A WAN is distinguished as a broader telecommunication structure from that of a local area network (LAN). An intermediate form of network in terms of geography is a metropolitan area network (MAN). A LAN is a network of interconnected workstations sharing the resources of a single processor or server within a relatively small geographic area (e.g. an office building). Some common LAN technologies include: Ethernet, token ring, ARCNET (Attached Resource Computer Network), and FDDI (Fiber Distributed Data Interface). A LAN may serve only a few users, or by using FDDI, may serve several thousand over a much wider area. The server will usually have applications and data storage that are shared in common by multiple workstation users.
A LAN server can also be used as a Web server on the Internet if safeguards are taken to secure internal applications and data from outside access. On the Internet, certain protocols are used, including TCP (Transmission Control Protocol) and IP (Internet Protocol). TCP uses a set of rules for exchanging messages with other Internet connections at the information packet level. IP uses a set of rules to send and receive messages at the Internet address level. For IP Version 4, an IP address consists of a 32-bit number, and is used to identify each sender and receiver of information that is sent in packets across the Internet. Note that IP Version 6 uses 128 bits, and future versions will likely use even more bits to facilitate higher data traffic flows. TCP/IP assigns a unique number (or xe2x80x9cIP numberxe2x80x9d) to every workstation. This IP number is a four byte value that, by convention, is expressed by converting each byte into a decimal number (0 to 255) and separating the bytes with a period. An IP address has two parts: the identifier of a particular network on the Internet (first two bytes) and an identifier of the particular device (which might be a server or workstation, second two bytes) within that network. The range of IP addresses is divided into xe2x80x9cclassesxe2x80x9d based upon the high order bits within the 32 bit IP address. Class A addresses are for large networks with many devices. Class B addresses are for medium-sized networks. Class C addresses are for small networks (fewer than 256 devices). Class D addresses are multicast addresses. Class E addresses are reserved.
The Open Systems Interconnection (OSI) standard is a system for transmission of messages between two points in a telecommunication network. The communication is divided into layers, with each layer adding certain additional functionality. For any given message, there will be a flow of data down through each layer at a sending point. At the receiving point, the data will flow up through the layers. The programming and hardware that furnishes these layers of functionality usually results from a combination of the computer operating system, applications, and TCP/IP or other network protocols. OSI divides a communication into seven layers. The layers are in two groups. The upper four layers are used when a message passes from or to a user. The lower three layers are used when any message passes through the host computer. Messages intended for this computer pass to the upper layers. Messages destined for some other host computer are not passed up to the upper layers but are forwarded to another host.
The seven OSI layers include: Layer 1, the physical layer, which conveys the bit stream through the network at the electrical and mechanical level; Layer 2, the data link layer, which provides error control and synchronization for the physical level; Layer 3, the network layer, which handles the routing and forwarding of data; Layer 4, the transport layer, which manages the end-to-end control and error-checking of data transfer; Layer 5, the session layer, which sets ups, coordinates, and terminates conversations, exchanges, and dialogs between the applications at each end; Layer 6, the presentation layer, which is usually part of the operating system and converts incoming and outgoing data from one presentation format to another (i.e. syntax layer); and Layer 7, the application layer, which is where communication partners are identified, quality of service is identified, user authentication and privacy are considered, and constraints on data syntax are identified. Referring again to Layer 2, or the data link layer (DLC), this protocol layer handles the moving of data in and out across the physical link in a network. The DLC contains two sublayers including Media Access Control (MAC) and Logical Link Control (LLC). On a LAN, for example, messages are sent between machines by supplying a six byte unique identifier, which is referred to as the MAC address.
Referring again to IP addresses belonging to Class D, a multicast address is used to send data to a large number of hosts on the Internet, rather than to a specific individual user. Not all hosts will actually use or process such data. Analogized to a radio or TV broadcast, the receiving party must have xe2x80x9ctunedxe2x80x9d their computer device to receive such data. For multicast addresses (in a 32 bit system), the lowest 4 bits are xe2x80x9c1110xe2x80x9d followed by the 28 bit multicast address. Hence, every IP datagram whose destination starts with xe2x80x9c1110xe2x80x9d is an IP multicast datagram. The machine or physical address (e.g MAC address) used within the local area network of an organization may be different than the IP address on the Internet. A typical example is the 48-bit Ethernet address (with Ethernet being a widely installed LAN technology). TCP/IP includes a facility called the Address Resolution Protocol (ARP) that lets the network administrator create a table that maps the 32-bit (4 byte) IP addresses to the 48-bit (6 byte) MAC addresses. (On an Ethernet LAN, the MAC address is the same as the Ethernet address)
A multicast address is transmitted to many hosts on a network. However, not all data frames associated with the multicast address are intended to pass through, and be processed by, the host machine. Hence, filtering of multicast addresses becomes important in order to improve the efficiency of a host machine. In past configurations, a multicast address filter uses the entire 6 byte destination address to perform a hashing function. Certain bits of the result will then be used as an index to a hash lookup table, with the table being initialized by a host machine driver or embedded firmware. If the indexed value in the lookup table is set, then the received data packet is passed through the filter and onto the host machine for further processing. If the indexed value in the lookup table is not set, then the data packet is discarded.
Hashing is the transformation of a string of characters into a usually shorter fixed-length value or key that represents the original string. Hashing is used to index and retrieve items from a table (or database). In general, hashing proves to be a faster method for indexing and finding an item, as it uses the shorter hashed key, rather than the original (longer) value. The hashing algorithm is called the hash function. Generally, a first hashed string will produce a different value than a second hashed string. However, the likelihood of the same resulting value from 2 different strings being produced by the hashing function increases as the number of bits output by the hash function decreases. The number of bits used depends upon the number of MAC addresses supported. For example, an 8 bit value is used if 256 MAC addresses are supported, and a 9 bit value for 512 MAC addresses, and so forth.
The probability of identical hash function values being produced from different input strings is extremely small, particularly as the number of bits output by the hash function approaches the number of bits input. In practice, however, a significantly smaller portion of the bits are actually used. For instance, 48 address bits are hashed down to 32 bits, thereby increasing the chance of duplication. Of the resulting 32 bits, an even fewer number is typically used to form the index. These factors substantially increase the chances of two indexes to the hash table being the same. This situation results in unwanted data frames being uploaded to the host machine, which consumes valuable processing power from the host central processing unit (CPU). This is an undesirable situation for a high performance network interface card.
Accordingly, an address filtering device and method are needed which will properly filter out unwanted addresses, and prevent their associated data frames from being uploaded and processed by a host machine. Typically this will be applied in the context of multicast addressing. Such filtering will thereby produce higher performance in the network interfacing card or device, and also the host machine.
The present invention provides a filtering device and method for preventing unwanted data frames from being passed through and processed by a receiving computer. A common application for such a device would include multicast filtering. The address associated with the data frame is hashed to produce an index to a lookup table which provides an initial status for the data frame. If the data frame is valid, then further processing is performed by a forwarding engine. An address table is included with entries having address status indicators and an address, with each entry similarly indexed per the hash value from the incoming address. If further processing is required, address status flags are read and verified. Based upon these flags, a comparison between the incoming address and the address entry from the address table is performed. A frame status register including a validity bit and multiplicity bit is updated. Based upon the frame status entries, the data frame is either discarded, or uploaded, or flagged for further processing and filtering by the host machine.
In particular, for a incoming data frame, a hash function is performed on the bits from a received MAC destination address using a polynomial cycle redundancy checking (CRC) algorithm. The hash function provides an index value. A lookup table is provided which contains a validity status for each incoming frame as indexed according to this result from the hash function. A forwarding engine is provided which discards or accepts the frame based upon the status of the indexed entry in the lookup table.
If the frame is accepted, then further filtering steps are performed. A MAC address table is further provided with entries indexed according to the same index values. Each table entry has an address status which includes a validity bit and a multiplicity bit, and the MAC destination address. The indexed entry is retrieved from the MAC address table and the validity bit of the address status is checked. If this bit is not set, then the frame is discarded and the validity bit in the frame status register is cleared. If the validity bit of the address status is set, then the multiplicity bit of the address status is checked. The multiplicity bit is used to indicate whether multiple MAC addresses of interest have been hashed into the same index value of the table entry. In practice, there will always be multiple MAC addresses that hash to the same value. This becomes significant, however, when more than one multicast address of interest hashes into the same index value. An address is xe2x80x9cof interestxe2x80x9d if that address is to be received by the host machine.
If the multiplicity bit of the address status is not set, then a full comparison is done between the incoming MAC destination address and the MAC address from the indexed table entry. If the addresses match, then validity bit is set and the multiplicity bit is cleared in the frame status entries. The frame status will then reflect a valid frame with a destination address which has been properly filtered. This will serve as an indicator for a host driver, on-board processor, or the like, that no further destination address filtering is needed. The frame will therefore be passed on, or uploaded, for further processing by the host computer. If the addresses do not match, then the validity bit in the frame status entries is cleared and the frame is discarded by the host machine.
If the multiplicity bit of the frame status entries is set, then this will indicate that the frame is valid, but that the frame has been hashed into a table entry with multiple destination addresses. This will serve as an indicator for the host driver, on-board processor, or the like, that such devices must perform further destination address filtering.
It is therefore one aspect of this invention to provide a filtering device which will prevent undesired data frames corresponding to certain addresses from being uploaded and processed by a receiving device.
It is another aspect of the present invention to provide a filtering device with a forwarding engine to further delineate whether an incoming MAC address is valid from an initial status check of a lookup table with hash indexed values.
It is still another aspect of the present invention to provide a MAC address table with entries having frame status bits and the MAC destination addresses indexed according the hash index values of the lookup table.
Another related aspect of the present invention is to compare the incoming MAC address with the indexed MAC destination address according to address status settings.
Still another aspect of the present invention is to set the frame status bits in the frame status register so that a driver or on-chip (on-board) processor can either upload the frame or perform further destination address filtering.